﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ReadyApps.Data.Exceptions
{
    /// <summary>
    /// Represents the error that occurs when a data store detects an anomaly
    /// in its storage scheme. This is used to indicate a severe error that
    /// must be corrected by an administrator on the data store directly.
    /// </summary>
    public class InvalidDataStateException : Exception
    {
        /// <summary>
        /// Initializes a new <see cref="InvalidDataStateException"/> with the
        /// given data provider method.
        /// </summary>
        /// <param name="dataProviderMethod">The invoked method that detected
        /// the data anomaly.</param>
        public InvalidDataStateException(string dataProviderMethod)
            : base(string.Format("Invalid data state detected in data provider. Method: {0}", dataProviderMethod)) { }
    }
}
